package com.example.springbootdemo.Test;

import com.example.springbootdemo.Controller.demo.demoController;
import com.example.springbootdemo.Mapper.demo.demoMapper;
import com.example.springbootdemo.Model.demo.demoDept;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

@SpringBootTest
public class SpringTester {
    @Autowired
    private demoController demo;
    @Autowired
    private demoMapper mapper;
    @Test
    public void testDemo()
    {
       System.out.println( demo.Method());
    }
    @Test
    public void testDataSource()
    {
        for (demoDept i :mapper.selectAllDept())
        {
            System.out.println(i);
        }

    }
}
